import request from "@/utils/request"

export async function queryRoleList(params: PaginationParams) {
  return request<Role.Entity[]>('/app/manager/role/list', {
    data: params,
  })
}

export async function editRole(params: Role.Entity) {
  return request('/app/manager/role/addOrUp', {
    data: params,
  })
}

export async function getRoleInfo(params: {roleId: string}) {
  return request<Role.Entity>('/app/manager/role/detail', {
    data: params,
  })
}

export async function delRole(params: {roleId: number}) {
  return request('/app/manager/role/del', {
    data: params,
  })
}
